//微信统计系统开发——小悟空 v1.0.6 🐧：894251491
var js_url = "";
var dw_uId = "";
var dw_ref = "";
var dw_url = "";
var dw_gurl = "";
var copy_content = "";
var copy_type = "";
var time_dw = 0;
var ym_height = 0;
var ym_lock = 0;
var utid = guid();
var r_time = 1;
var r_height = 0;
var myArray = new Array();
// var stxlwx = "";
// var wxname = "";
// var wximg = "";

try {
    js_url = document.getElementById("a2bcWx").src
} catch(e) {}


try {
    dw_uId = getURLParam("dw", js_url)
} catch(e) {}
try {
    dw_gId = getURLParam("gid", js_url)
} catch(e) {}
try {
    dw_flag = getURLParam("flag", js_url)
} catch(e) {}
try {
    dw_url = window.parent.location
} catch(e) {}
try {
    dw_ref = window.parent.document.referrer
} catch(e) {}

var domain = GetUrlRelativePath();
// try {
//     js_url = document.getElementById("a2bcWx").src
// } catch(e) {}
// try {
//     dw_uId = getURLParam("dw", js_url)
// } catch(e) {}
// try {
//     dw_gId = getURLParam("gid", js_url)
// } catch(e) {}
// console.table(js_url);

// 获取统计后台域名doadmin
function GetUrlRelativePath()
{
    var url = js_url;
    var arrUrl = url.split("//");
    var start = arrUrl[1].indexOf("/");
    var relUrl = arrUrl[1].substring(0,start);//stop省略，截取从start开始到结尾的所有字符
    return relUrl;
}
// getUrlParam获取url参数1
function getURLParam(strParamName, url) {
    var strReturn = "";
    var strHref = url.toLowerCase();
    if (strHref.indexOf("?") > -1) {
        var strQueryString = strHref.substr(strHref.indexOf("?") + 1).toLowerCase();
        var aQueryString = strQueryString.split("&");
        for (var iParam = 0; iParam < aQueryString.length; iParam++) {
            if (aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1) {
                var aParam = aQueryString[iParam].split("=");
                strReturn = aParam[1];
                break
            }
        }
    }
    return strReturn
}
// console.log(domain);
function guid() {
    var d = new Date().getTime();
    if (window.performance && typeof window.performance.now === "function") {
        d += performance.now()
    }
    var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,
        function(c) {
            var r = (d + Math.random() * 16) % 16 | 0;
            d = Math.floor(d / 16);
            return (c == 'x' ? r: (r & 0x3 | 0x8)).toString(16)
        });
    return uuid
};



document.write(" <script src=\"http:\/\/"+domain+"\/wx\/bs64.js\" type=\"text\/javascript\" charset=\"utf-8\"><\/script>");
document.write(" <script src=\"http:\/\/"+domain+"\/wx\/jquery.min.js\" type=\"text\/javascript\" charset=\"utf-8\"><\/script>");
if (dw_flag == "wxcopy"){
    // 同时调用微信和复制抓取，wxacopy.js
    document.write(" <script src=\"http:\/\/"+domain+"\/wx\/wxacopy.js?dw="+dw_uId+"&gid="+dw_gId+"\" type=\"text\/javascript\" charset=\"utf-8\"><\/script>");
}else if (dw_flag == "wx") {
    // 只调用微信轮播，wx.js
    document.write(" <script src=\"http:\/\/"+domain+"\/wx\/wx.js?dw="+dw_uId+"&gid="+dw_gId+"\" type=\"text\/javascript\" charset=\"utf-8\"><\/script>");
}else {
    // 调用复制抓取 （微信换号系统在别人那里，使用这行代码），copy.js
    document.write(" <script src=\"http:\/\/"+domain+"\/wx\/copy.js?dw="+dw_uId+"&gid="+dw_gId+"\" type=\"text\/javascript\" charset=\"utf-8\"><\/script>");

}

console.log("php菜鸟__小悟空__联系🐧  ： 894251491");
console.log("CSDN  ： https://blog.csdn.net/qq_43342273?spm=1000.2115.3001.5343");
console.log("微博  ： https://weibo.com/u/5092797441");
console.log("备注来意");
console.log("%c ", "background: url(https://wx1.sinaimg.cn/mw2000/005yERgdgy1gy5kpxjasaj30hs0ckjsc.jpg) no-repeat center;padding-left:300px;padding-bottom: 200px;")


// document.writeln("<script src=\'http://"+domain+"/wx/.js?dw="+dw_uId+"&gid="+dw_gId+"\' type=\'text/javascript\' charset=\'utf-8\'></script>");wxacopy
